package main

import (
	"encoding/json"
	"net/http"
)

type msg struct {
	Msg string
}

func handler(w http.ResponseWriter, r *http.Request) {
	m := msg{"Hello World"}
	msgStr, _ := json.Marshal(m)
	w.Write([]byte(msgStr))
}

func main() {
	http.Handle("/", http.FileServer(http.Dir("d:/go/src/jsoncom/")))
	http.HandleFunc("/data", handler)
	http.ListenAndServe(":9090", nil)
	
}
